package hn.sigit.view;

import hn.sigit.logic.viewer.InteractiveViewerHelper;
import hn.sigit.model.commons.ISpatialZone;

import java.io.Serializable;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

@Name("topographyHelper")
@Scope(value = ScopeType.CONVERSATION)
@AutoCreate
public class TopographyHelper implements Serializable {
	private static final long serialVersionUID = 1L;

	private ISpatialZone selectedSpatialZone;
	
	@In(create=true)
	private InteractiveViewerHelper interactiveViewerHelper;


	public ISpatialZone getSelectedSpatialZone() {
		return selectedSpatialZone;
	}
	public void setSelectedSpatialZone(ISpatialZone selectedSpatialZone) {
		this.selectedSpatialZone = selectedSpatialZone;
	}
	
	
	public String selectZoneFromMap() {
		setSelectedSpatialZone(interactiveViewerHelper.getSelectedZone());
		return null;
	}
}
